//
//  FMSNetWorkModule.h
//  WRNetWorkKit
//
//  Created by founder on 14-7-27.
//  Copyright (c) 2014年 com.founder. All rights reserved.
//

#import <Foundation/Foundation.h>
@class FMSMKNetworkOperation;

typedef void (^PEBlockCompletion)(id result);
typedef void (^PEBlockError)(NSString *error);

@interface FMSNetWorkModule : NSObject

+(FMSNetWorkModule* )sharedInstance;

#pragma mark - 网络接口处理

//GET请求处理的方法
-(void)getRequestDataWithMethod:(NSString*)getStr
                   showHintView:(UIView*)hintView
                   completionCB:(PEBlockCompletion)completionBlock
                        errorCB:(PEBlockError)errorBlock;

//POST请求处理的方法
-(void)postRequestDataWithMethod:(NSDictionary*)postDic
                     withURLPath:(NSString*)path
                    showHintView:(UIView*)hintView
                    completionCB:(PEBlockCompletion)completionBlock
                         errorCB:(PEBlockError)errorBlock;

#pragma mark - 下载处理
-(FMSMKNetworkOperation*) downloadFatAssFileFrom:(NSString*) remoteURL toFile:(NSString*) filePath  completionCB:(PEBlockCompletion)completionBlock;

#pragma mark - 上传处理
-(FMSMKNetworkOperation*) uploadImageFromFile:(NSString*) file
                              completionCB:(PEBlockCompletion)completionBlock
                                   errorCB:(PEBlockError)errorBlock;
/*
#pragma mark - 缩略图
-(void) imagesForTag:(NSString*)tag completionCB:(PEBlockCompletion)completionBlock errorCB:(PEBlockError)errorBlock;*/
-(void)cancleAllOperation;
@end
